import 'dart:io';

import 'package:flutter/material.dart';
import 'package:hao_ke/pages/auth/auth.dart';
import 'package:hao_ke/pages/utils/scoped_model_helper.dart';

import '../utils/shared_preferences.dart';

class Loading extends StatefulWidget {


  @override
  State createState() {
    return _LoadingState();
  }
}

class _LoadingState extends State<Loading> {

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Container(
        decoration: const BoxDecoration(
          color: Colors.white,
          image: DecorationImage(
              image: AssetImage('images/icon.png'),
          ),
        ),
      ),
    );
  }


  @override
  void initState() {
    super.initState();
    initToken();
  }

  initToken() async {
    ScopedModelHelper.getModel<AuthModel>(context).initApp(context);
  }
}
